package com.yundasys.lab02springbootstudy.listener;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @PACKAGE_NAME: com.yundasys.lab02springbootstudy.listener
 * @NAME: MyAnnotationListener
 * @USER: jiangta
 * @DATE: 2021/12/10
 * @TIME: 3:33 下午
 * @PROJECT_NAME: springboot-labs
 */
@Component
public class MyAnnotationListener {

    @EventListener(classes = ApplicationEvent.class)
    public void listen1(ApplicationEvent event) {
        System.out.println("事件触发：" + event.getClass().getName());
    }
}
